import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;


public class SaveLevel {
	
	public static void Save() throws IOException{
		String e = "";
		System.out.println("Done" + e);
		for(int i = 0; i < VarHolder.ArrayMax; i++){
			e = "" + e + VarHolder.TileType[i] + "\n" ;
			
			
			if(i >= VarHolder.ArrayMax - 1){
				//System.out.println("Done" + e);
				Writer output = null;
				  String text = e;
				  File file = new File("Level.txt");
				  output = new BufferedWriter(new FileWriter(file));
				  output.write(text);
				  output.close();
				  System.out.println("File has been written"); 
			}
		}
	}

}
